import request, { METHOD } from '../service/request.service';
import { formatTableResult, defaultPagination } from './common';

export function getMachinesList(params){
 return request({
  url: '/machines',
  method: METHOD.GET,
  params: {
    ...defaultPagination,
    ...params
  },
 }).then(formatTableResult)
}
export function getMachinesListByStatus(params){
 return request({
  url: '/machines/status',
  method: METHOD.GET,
  params: {
    ...defaultPagination,
    ...params
  },
 }).then(formatTableResult)
}
export function getIncome(){
 return request({
  url: '/income',
  method: METHOD.GET,
 })
}
